package com.magina.antiPro.service;


import com.alibaba.fastjson.JSONException;
import com.magina.antiPro.model.JSConfig;
import com.magina.antiPro.model.LocationBean;
import com.magina.antiPro.model.Members;
import com.magina.antiPro.model.WeiXinUser;

import java.util.Map;

public interface WechatService {
    Members getMembersInfo(String code) throws IllegalAccessException, JSONException;

    JSConfig getJSConfig(String url);

//    int addLocation(LocationBean locationBean);

    /**
     * 获取到微信个人用户的信息
     *
     * @param accessToken
     * @param openId
     * @return
     */
    WeiXinUser getUserInfo(String accessToken, String openId);

    /**
     * 用于获取网页授权后的信息字段，其中主要是获取openId
     *
     * @param code 授权码
     * @return
     */
    Map<String, String> getAuthInfo(String code);

    /**
     * 进行网页授权的认证
     *
     * @param code 授权码
     * @return
     */
    Map<String, String> oauth2GetOpenid(String code);


}
